package com.yida.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yida.service.serverphoto;

@Controller
public class adminPhotos {
	
	@Autowired
	public serverphoto service;
	
	@RequestMapping("/admin/photos")
	public String photo(Model mode,Integer id) {
		
	List<com.yida.bean.photo> photos = service.photos(id);	
    mode.addAttribute("photos", photos);
    
    com.yida.bean.phototype phototype = service.phototypebyid(id);	
    mode.addAttribute("phototype", phototype);
    
      return  "admin/photo";
	}

}
